/*
 Navicat Premium Data Transfer

 Source Server         : 法雷奥考勤库
 Source Server Type    : SQL Server
 Source Server Version : 13004001
 Source Host           : 192.168.2.221:1433
 Source Catalog        : scm_main
 Source Schema         : dbo

 Target Server Type    : SQL Server
 Target Server Version : 13004001
 File Encoding         : 65001

 Date: 23/12/2019 17:41:43
*/


-- ----------------------------
-- Table structure for bd_banci_department_config
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[bd_banci_department_config]') AND type IN ('U'))
	DROP TABLE [dbo].[bd_banci_department_config]
GO

CREATE TABLE [dbo].[bd_banci_department_config] (
  [id] int  IDENTITY(1,1) NOT NULL,
  [banci_id] int  NOT NULL,
  [dep_id] char(16) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [whether_deleted] int DEFAULT ((0)) NULL
)
GO

ALTER TABLE [dbo].[bd_banci_department_config] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'ID主键',
'SCHEMA', N'dbo',
'TABLE', N'bd_banci_department_config',
'COLUMN', N'id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'班次ID',
'SCHEMA', N'dbo',
'TABLE', N'bd_banci_department_config',
'COLUMN', N'banci_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'部门ID',
'SCHEMA', N'dbo',
'TABLE', N'bd_banci_department_config',
'COLUMN', N'dep_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'是否删除  0不删除',
'SCHEMA', N'dbo',
'TABLE', N'bd_banci_department_config',
'COLUMN', N'whether_deleted'
GO

EXEC sp_addextendedproperty
'MS_Description', N'部门与班次配置',
'SCHEMA', N'dbo',
'TABLE', N'bd_banci_department_config'
GO


-- ----------------------------
-- Primary Key structure for table bd_banci_department_config
-- ----------------------------
ALTER TABLE [dbo].[bd_banci_department_config] ADD CONSTRAINT [PK_BD_BANCI_DEPARTMENT_CONFIG] PRIMARY KEY CLUSTERED ([id], [banci_id], [dep_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO

